<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no" />
		<title>首页</title>
		<link rel="stylesheet" type="text/css" href="../c/aui.css" />
		<link rel="stylesheet" type="text/css" href="../c/suxiangw.css" />
		<style>
			body{
				 background-color:transparent;
				  background-color:#000;
			}
			#sx-footer{
				border-top:0.05rem solid #232323;
			}
			#tag{
				width: 100px;
				display: flex;
				justify-content:space-between;
				margin: 0 auto;
				align-items: center;
			}
			#tag div{
				font-size: 0.8rem;
				opacity: 0.7
			}
			#tag div.a{
				opacity: 1;
			}
			#tag div.a span{
				-webkit-transition: all .3s;
				transition: all .3s;
				/*border-bottom: 0.1rem solid #fff;*/
				padding-bottom: 0.15rem;
				font-size: 0.85rem;
				font-weight: bold;
			}
		</style>
	</head>
	<body>
		<header class="aui-bar aui-bar-nav" id="sx-header">
			<div class="aui-title" id="tag">
				<div class="a" tapmode onclick="a(0)"><span>推荐</span></div>
				<div tapmode onclick="a(1)"><span>新手</span></div>
			</div>
			<a class="aui-pull-right aui-btn" tapmode onclick=""></a>
		</header>
		<footer class="aui-bar aui-bar-tab" id="sx-footer">
			<div class="aui-bar-tab-item" tapmode onclick="_index_win('index')">
				<div class="aui-bar-tab-label">
					首页
				</div>
			</div>
			<div class="aui-bar-tab-item aui-active" tapmode onclick="_shuaxin('zhibo')">
				<div class="aui-bar-tab-label">
					直播
				</div>
				<em></em>
			</div>
			<div class="aui-bar-tab-item" tapmode onclick="_index_win('fabu')">
				<img style="width: 2.2rem;" src="../i/add.png" />
			</div>
			<!-- <div class="aui-bar-tab-item" id="renwu" tapmode onclick="_index_win('renwu')">
				<div class="aui-bar-tab-label">
					任务
				</div>
				<div class="aui-badge aui-hide"></div>
			</div> -->
			<div class="aui-bar-tab-item" id="article" tapmode onclick="_index_win('article')">
				<div class="aui-bar-tab-label">
					社交
				</div>
			</div>
			<div class="aui-bar-tab-item" tapmode onclick="_index_win('member')">
				<div class="aui-bar-tab-label">
					我的
				</div>
			</div>
		</footer>
	</body>
	<script type="text/javascript" src="../j/api.js"></script>
	<script type="text/javascript">
		apiready = function() {
			var frames = [];
			var name = 'zhibo_index';
			for (var i = 0; i < 2; i++) {
				var frame = {};
				frame.name = name + '_'+i;
				frame.url = _h_w + name + '.html';
				frame.bgColor = 'rgba(0,0,0,0)';
				frame.pageParam = {
					name: name[i],
					index: i,
				}
				frames.push(frame);
			}
			openFrameGroup(frames)
		}
		function openFrameGroup(frames) {
			var header = $api.byId('sx-header');
			$api.fixStatusBar(header);
			var headerPos = $api.offset(header);
			var headerh = headerPos.h
			var body_h = api.winHeight;
			$api.fixTabBar($api.byId('sx-footer'))
			var footerh = $api.offset($api.byId('sx-footer')).h;
			//console.info(JSON.stringify(frames))
			api.openFrameGroup({
				name: 'zhibo',
				bounces: false,
				scrollEnabled:true,
				rect: {
            x: 0,
            y: headerh,
            w: 'auto',
            h: body_h - headerh - footerh
        },
				frames: frames,
				index: 0,
				preload: 0, // 预加载的 frame 个数，默认加载当前页后面一个
			}, function(ret, err) {
				a(ret.index)
			});
		}
		function a(i){
			api.setFrameGroupIndex({
				name: 'zhibo',
				index: i,
				scroll: true,
			});
			cla(i)
		}
		function cla(i) {
			$('#tag .a').removeClass('a');
			$('#tag div').eq(i).addClass('a');
		}
	</script>
</html>
